_gtk_icon_helper_draw: get style earlier
authorDaniel Drake <drake@endlessm.com>
Mon, 26 Sep 2016 19:18:59 +0000 (13:18 -0600)
committerCosimo Cecchi <cosimo@endlessm.com>
Mon, 26 Sep 2016 21:23:51 +0000 (14:23 -0700)
commitfa23641992e0fc1e7ec64c56975d7b13d7d0de1b
tree72fc7aba2cb0571c69fb06bd83389a887453d2f5
parentfe216b0039bb4344d715421245327ce3547c0a08
_gtk_icon_helper_draw: get style earlier

After checking for rendered_surface, the call to gtk_css_node_get_style
can invalidate the style and result in rendered_surface being set to
NULL. This was result in some icon views appearing blank on
Endless OS on armv7hl, and this error:

Gtk-CRITICAL **: gtk_css_style_render_icon_surface: assertion 'surface != NULL' failed

Call gtk_css_node_get_style earlier to ensure we always pass a valid
surface to gtk_css_style_render_icon_surface.

https://bugzilla.gnome.org/show_bug.cgi?id=765649
https://phabricator.endlessm.com/T13524
gtk/gtkiconhelper.c